Skip to content

Fix client disconnections caused by incorrect metadata offsets in horse packets#29

Merged
Tofaa2 merged 2 commits intoTofaa2:masterfrom
steveb05:fix/wrong-horse-parent-class
May 1, 2025
Merged

Fix client disconnections caused by incorrect metadata offsets in horse packets#29
Tofaa2 merged 2 commits intoTofaa2:masterfrom
steveb05:fix/wrong-horse-parent-class

Conversation

@steveb05
Copy link
Contributor

This PR resolves an issue where clients would disconnect when receiving horse entity metadata packets.

Previously, BaseHorseMeta inherited from MobMeta and implemented methods for setting/getting an Owner UUID. However, vanilla Minecraft's AbstractHorse class does not synchronize the owner between server and client (unlike TamableAnimal which does). This difference meant that when sending packets, the data was positioned at indices the client didn't expect for horses, causing misalignment and disconnections.

This fix changes BaseHorseMeta to inherit from AgeableMeta instead, which correctly aligns the starting metadata index with vanilla's structure for horses. The non-functional getOwner() and setOwner() methods have been removed as they were relying on non-existent synchronized data.

These changes also properly enable the baby flag functionality for horses and related entities to work.

steveb05 and others added 2 commits April 30, 2025 13:54
…r methods

Inheriting from MobMeta caused incorrect metadata offsets for horses, leading to client disconnections when metadata packets were sent. Vanilla horses don't synchronize Owner UUID via metadata, making the previous owner methods non-functional client-side.

Changing inheritance to AgeableMeta also enables baby horse functionality.
@Tofaa2 Tofaa2 merged commit 630837f into Tofaa2:master May 1, 2025
1 check failed
@steveb05 steveb05 deleted the fix/wrong-horse-parent-class branch August 19, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants